unit SceneCustom;

interface

uses Scene, Engine, DGLE, DGLE_Types;

type
  TSceneCustom = class(TScene)
  private
    pBackground: ITexture;
  public
    constructor Create(const FileName: AnsiString);
    destructor Destroy; override;
    procedure Render(); override;
    procedure Update(); override;
  end;

implementation

{ TSceneCustom }

constructor TSceneCustom.Create(const FileName: AnsiString);
begin
  pBackground := nil;
  pResMan.Load(PAnsiChar('Resources\Sprites\Interface\' + FileName), IEngineBaseObject(pBackground), TEXTURE_LOAD_DEFAULT_2D);
end;

destructor TSceneCustom.Destroy;
begin
  pBackground := nil;
  inherited;
end;

procedure TSceneCustom.Render;
begin
  pRender2D.DrawTexture(pBackground, Point2(), Point2(SCREEN_WIDTH, SCREEN_HEIGHT));
end;

procedure TSceneCustom.Update;
begin

end;

end.
